<script setup lang="ts">
import useCounterStore from './stores/counter'
// !必须调用一下生成 store 实例
const counterStore = useCounterStore()
</script>
<template>
  <div>
    <p>count: {{counterStore.count}}</p>
    <p>doubleCount: {{counterStore.doubleCount}}</p>
    <button @click="counterStore.increment">+1</button>
    <button @click="counterStore.incrementAsync">async+1</button>
  </div>
</template>
